package com.pace.ribbon.day03;import org.springframework.context.annotation.Conditional;import org.springframework.stereotype.Component;/** * @Auther: sky * @Date: 2019/3/27 23:20 * @Description:Conditional有条件的创建bean */@Component@Conditional(ConditionImpl.class)public class InitBean {    private String jdbcName;    private String className;    public InitBean(String jdbcName, String className) {        this.jdbcName = jdbcName;        this.className = className;    }    public String getJdbcName() {        return jdbcName;    }    public void setJdbcName(String jdbcName) {        this.jdbcName = jdbcName;    }    public String getClassName() {        return className;    }    public void setClassName(String className) {        this.className = className;    }    public void sayHello(){        System.out.println("hello");    }}